<script>
	const arr = [0, 1, 2];
	console.log(arr.lastIndexOf(2));
	console.log(arr.lastIndexOf(2, arr.length - 1));
</script>